/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author FIRE
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '../model/baseModel';

const { adminPath } = useGlobSetting();

export interface M8ViewDriver extends BasicModel<M8ViewDriver> {
  code?: string; // 驾驶员编号
  name?: string; // 驾驶员名称
}

export const m8ViewDriverList = (params?: M8ViewDriver | any) =>
  defHttp.get<M8ViewDriver>({ url: adminPath + '/bas/driver/m8ViewDriver/list', params });

export const m8ViewDriverListData = (params?: M8ViewDriver | any) =>
  defHttp.post<Page<M8ViewDriver>>({
    url: adminPath + '/bas/driver/m8ViewDriver/listData',
    params,
  });

export const m8ViewDriverForm = (params?: M8ViewDriver | any) =>
  defHttp.get<M8ViewDriver>({ url: adminPath + '/bas/driver/m8ViewDriver/form', params });

export const m8ViewDriverSave = (params?: any, data?: M8ViewDriver | any) =>
  defHttp.postJson<M8ViewDriver>({
    url: adminPath + '/bas/driver/m8ViewDriver/save',
    params,
    data,
  });

export const m8ViewDriverDelete = (params?: M8ViewDriver | any) =>
  defHttp.get<M8ViewDriver>({ url: adminPath + '/bas/driver/m8ViewDriver/delete', params });
